package com.example.hello.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author sjw
 * @className MongoDBCustomProperties
 * @date 2022/5/23 17:55
 * @description: TODO
 */
@Component
@ConfigurationProperties(prefix = "spring.data.mongodb")
public class MongoDBCustomProperties {

    // 复制集链接uri
    private String uri;
    //数据库名称
    private String database;
    // 地址
    private String host;
    // 端口
    private Integer port;
    //复制集
    private String replicaSet;
    //用户名
    private String username;
    //密码
    private String password;
    //最小连接数
    private Integer minConnections;
    //最大连接数
    private Integer maxConnections;
    //最大队列
    private Integer maxQueue;

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getDatabase() {
        return database;
    }

    public void setDatabase(String database) {
        this.database = database;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getReplicaSet() {
        return replicaSet;
    }

    public void setReplicaSet(String replicaSet) {
        this.replicaSet = replicaSet;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getMinConnections() {
        return minConnections;
    }

    public void setMinConnections(Integer minConnections) {
        this.minConnections = minConnections;
    }

    public Integer getMaxConnections() {
        return maxConnections;
    }

    public void setMaxConnections(Integer maxConnections) {
        this.maxConnections = maxConnections;
    }

    public Integer getMaxQueue() {
        return maxQueue;
    }

    public void setMaxQueue(Integer maxQueue) {
        this.maxQueue = maxQueue;
    }
}

